home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 54.zip / BS part 54 / FinalCopyII.adf / SampleMacros / ToNormal < prev   
Encoding:
Text File  |  1992-10-12  |  1.0 KB  |  37 lines

  1. /* -----------------------------------------    */
  2. /* Final Copy II Arexx Macro - TO NORNAL    */
  3. /* Set the font at the insertion point to    */
  4. /* Normal. Note that this will only work for    */
  5. /* fonts whose styled names start with '_'    */
  6. /* (the underscore character) such as        */
  7. /* X X_Italic, X_Bold, X_BoldItalic.        */
  8. /* -----------------------------------------    */
  9. Options Results
  10.  
  11. /* ------------------------------ */
  12. /* Get the complete font pathname */
  13. /* ------------------------------ */
  14. Status FontPath
  15. fontpath = Result
  16.  
  17. /* ------------------------------------- */
  18. /* Get only the font filename (w/o path) */
  19. /* ------------------------------------- */
  20. Status FontName
  21. fontname = Result
  22.  
  23. /* -------------------------------- */
  24. /* Does the file name have an '_'   */
  25. /* This will signify if the forn is */
  26. /* normal or styled.                */
  27. /* -------------------------------- */
  28. pos = LASTPOS('_', fontname)
  29. IF    (pos ~= 0) THEN
  30.     DO
  31.     pos = LASTPOS('_', fontpath)
  32.     fontpath = DELSTR(fontpath, pos)
  33.     END
  34.  
  35. Font fontpath
  36.  
  37.